import request from "@/utils/request";
import pathname from "./pathname";

export function getLabelList(deptId) {
  return request({
    url: pathname.getLabelList.replace(/{deptId}/g, deptId),
    method: "get",
    _hasLoading: true
  });
}
export function getNormalDeptList(data) {
  return request({
    url: pathname.getNormalDeptList,
    method: "post",
    data,
    _hasLoading: true
  });
}
export function getEvaluationType(data) {
  return request({
    url: pathname.getEvaluationType,
    method: "post",
    data,
    _hasLoading: true
  });
}
export function getEvaluationList(data) {
  return request({
    url: pathname.getEvaluationList,
    method: "post",
    data,
    _hasLoading: true
  });
}
export function getAppraisalLevel(data) {
  return request({
    url: pathname.getAppraisalLevel,
    method: "post",
    data,
    _hasLoading: true
  });
}
export function checkGoodOption(data) {
  return request({
    url: pathname.checkGoodOption,
    method: "post",
    data,
    _hasLoading: true
  });
}
export function saveEvaluation(data) {
  return request({
    url: pathname.saveEvaluation,
    method: "post",
    data,
    _hasLoading: true
  });
}
export function getYearEvaluationType(data) {
  return request({
    url: pathname.getYearEvaluationType,
    method: "post",
    data,
    _hasLoading: true
  });
}
export function getYearEvaluationList(data) {
  return request({
    url: pathname.getYearEvaluationList,
    method: "post",
    data,
    _hasLoading: false
  });
}
export function getYearAppraisalLevel(data) {
  return request({
    url: pathname.getYearAppraisalLevel,
    method: "post",
    data,
    _hasLoading: false
  });
}
export function saveYearEvaluation(data) {
  return request({
    url: pathname.saveYearEvaluation,
    method: "post",
    data,
    _hasLoading: true
  });
}

export function getYearEvaluationDept(params){
  return request({
    url: pathname.getYearEvaluationDept,
    method: "get",
    params,
    _hasLoading: false
  });
}

export function checkYearGoodOption(params){
  return request({
    url: pathname.checkYearGoodOption,
    method: "get",
    params,
    _hasLoading: true
  });
}

export function getAssessResult(id){
  return request({
    url: pathname.getAssessResult.replace(/{id}/g, id),
    method: "get",
    _hasLoading: true
  });
}

export function getYearAssessResult(id){
  return request({
    url: pathname.getYearAssessResult.replace(/{id}/g, id),
    method: "get",
    _hasLoading: true
  });
}
